import Vue from 'vue'
import Router from 'vue-router'
import Login from '../components/Page/Login'
import Home from '../components/Page/Home'
import ProductPage from '../components/Page/ProductPage'
import ProductStockPage from '../components/Page/ProductStockPage'
import ProductStockLogPage from '../components/Page/ProductStockLogPage'
import ProductLogPage from '../components/Page/ProductLogPage'
import ProductClassifyPage from '../components/Page/ProductClassifyPage'
import SupplierOrderPage from '../components/Page/SupplierOrderPage'
import SupplierOrderApplyPage from '../components/Page/SupplierOrderApplyPage'
import SupplierOrderExpressPage from '../components/Page/SupplierOrderExpressPage'
import SysUserPage from '../components/Page/SysUserPage'
import SupplierPage from '../components/Page/SupplierPage'
import SupplierBankPage from '../components/Page/SupplierBankPage'
import SupplierWithdrawPage from '../components/Page/SupplierWithdrawPage'
import SupplierUpdateMainPage from '../components/Page/SupplierUpdateMainPage'
import UserLoginLogPage from '../components/Page/UserLoginLogPage'
import SupplierAddressPage from '../components/Page/SupplierAddressPage'
import SupplierAddressFormPage from '../components/Page/SupplierAddressFormPage'
import SupplierMoneyLogPage from '../components/Page/SupplierMoneyLogPage'
import SupplierBrandPage from '../components/Page/SupplierBrandPage'
import MyAMap from '../components/Page/MyAMap'
import ChatPage from '../components/Page/ChatPage'
import SupplierProductSpecificationsPage from '../components/Page/SupplierProductSpecificationsPage'

Vue.use(Router)

// 两种方式: hash带#的路由,history就是把省掉
export default new Router({
  mode: 'hash',
  routes: [
    // 默认选择: 主页
    {
      path: '/',
      redirect: '/Home',
      meta: {
        title: '首页'
      }
    },
    {
      path: '/Home',
      name: 'Home',
      component:Home
    },
    {
      path: '/SysUser',
      name: 'SysUser',
      component:SysUserPage
    },
    {
      path: '/ProductPage',
      name: 'ProductPage',
      component:ProductPage
    },
    {
      path: '/ProductStockPage',
      name: 'ProductStockPage',
      component:ProductStockPage
    },
    {
      path: '/ProductStockLogPage',
      name: 'ProductStockLogPage',
      component:ProductStockLogPage
    },
    {
      path: '/ProductLogPage',
      name: 'ProductLogPage',
      component:ProductLogPage
    },
    {
      path: '/ProductClassifyPage',
      name: 'ProductClassifyPage',
      component:ProductClassifyPage
    },
    {
      path: '/SupplierPage',
      name: 'SupplierPage',
      component: SupplierPage
    },
    {
      path: '/SupplierBankPage',
      name: 'SupplierBankPage',
      component: SupplierBankPage
    },
    {
      path: '/SupplierWithdrawPage',
      name: 'SupplierWithdrawPage',
      component: SupplierWithdrawPage
    },
    {
      path: '/SupplierUpdateMainPage',
      name: 'SupplierUpdateMainPage',
      component: SupplierUpdateMainPage
    },
    {
      path: '/MyAMap',
      name: 'MyAMap',
      component:MyAMap
    },
    {
      path: '/ChatPage',
      name: 'ChatPage',
      component:ChatPage
    },
    {
      path: '/SupplierOrderPage',
      name: 'SupplierOrderPage',
      component:SupplierOrderPage
    },
    {
      path: '/SupplierOrderApplyPage',
      name: 'SupplierOrderApplyPage',
      component:SupplierOrderApplyPage
    },
    {
      path: '/SupplierOrderExpressPage',
      name: 'SupplierOrderExpressPage',
      component:SupplierOrderExpressPage
    },
    {
      path: '/UserLoginLogPage',
      name: 'UserLoginLogPage',
      component:UserLoginLogPage
    },
    {
      path: '/SupplierAddressPage',
      name: 'SupplierAddressPage',
      component:SupplierAddressPage
    },
    {
      path: '/SupplierAddressFormPage',
      name: 'SupplierAddressFormPage',
      component:SupplierAddressFormPage
    },
    {
      path: '/SupplierMoneyLogPage',
      name: 'SupplierMoneyLogPage',
      component:SupplierMoneyLogPage
    },
    {
      path: '/SupplierBrandPage',
      name: 'SupplierBrandPage',
      component:SupplierBrandPage
    },
    {
      path: '/SupplierProductSpecificationsPage',
      name: 'SupplierProductSpecificationsPage',
      component:SupplierProductSpecificationsPage
    },
    {
      path: '/Login',
      name: 'Login',
      meta: {
        title: '登录'
      },
      component:Login
    }
  ]
})
